package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 一级分销奖金发放记录
 * </p>
 *
 * @author jcd
 * @since 2024-08-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("e_one_level_distribution_grant")
public class OneLevelDistributionGrant {

    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 类型 recommendFirstOrder:推荐新用户首次下单奖 memberRepeatOrder:会员重复下单奖 teamLeaderReward:团长奖励 dayBonus:每天分红
     */
    private String type;

    /**
     * 发放时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date date;

    /**
     * 发放用户ID
     */
    private String userIds;

    /**
     * 发放用户ID和账号
     */
    private String userJson;

    /**
     * 涉及订单号
     */
    private String orderNumber;

    /**
     * 涉及订单ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long orderId;

    /**
     * 发放金额
     */
    private BigDecimal money;

    /**
     * 发放总金额
     */
    private BigDecimal totalMoney;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long createBy;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long updateBy;

    private Date createTime;

    private Date updateTime;

    @TableLogic(value="0",delval="1")
    private Integer delFlag;
}
